package com.dt.com;

public class lihai {
    public static void main(String[] args) {
        anm anm1 = new cat();
        anm anm2=new anm();
        anm1.eat();

        System.out.println(anm1 instanceof anm);
        System.out.println(anm1 instanceof cat);
        anm1.gb();
        System.out.println( anm1.age);//属性间不存在重写
        cat cat1=(cat)anm1;//类型转换
        String a="eiwo";
        System.out.println(cat1 instanceof anm);
        System.out.println(cat1 instanceof cat);
        System.out.println(anm1 instanceof anm);
        cat1.mouse();
        Object obj = new Object();
        System.out.println(obj instanceof anm);
        System.out.println(anm1 instanceof Object);
    }
}
